package com.yanwu.www;

import com.yanwu.www.config.version.ApiVersion;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * All rights Reserved.
 *
 * @version V1.0
 * @Package com.yanwu.www
 * @author: harvey
 * @date: 2019/2/26 14:03
 * @Copyright: 2019
 */

@SpringBootApplication
@RestController
@RequestMapping("/api")
public class App {

    public static void main(String[] args) {

        SpringApplication.run(App.class);

    }

    @ApiVersion(3)
    @RequestMapping("/{version}/test")
    public String testV3(){

        return "test V3";
    }

    @ApiVersion(2)
    @RequestMapping("/{version}/test")
    public String testV2(){

        return "test V2";
    }


    @RequestMapping("/{version}/test")
    public String testV0(){

        return "test V0";
    }

}
